package com.liu.juc.lock;

/**
 * @author TOP_LIU
 * @description
 * @date 2021/9/12
 */
public class SynTest {
    public static void main(String[] args) {
     Ticket ticket = new Ticket();

      new Thread(()->{
          for (int i = 0; i<40;i++) {
              ticket.slve();
          }

      },"A").start();

        new Thread(()->{
            for (int i = 0; i<40;i++) {
                ticket.slve();
            }

        },"B").start();

        new Thread(()->{
            for (int i = 0; i<40;i++) {
                ticket.slve();
            }

        },"C").start();
    }
}

